package com.awenhui.demo.model.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author yuxf
 * @version 1.0
 * @date 2021/2/23 16:10
 */
@Data
@Table(name = "ua_user")
@TableName("ua_user")
@JsonIgnoreProperties(value = "handler")
public class UaUserEntity {
    /**
     * 用户ID(雪花算法生成)
     */
    @Id
    @TableId
    private Long userId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    @Column(name = "password",length = 20,nullable = false)
    private String password;

    /**
     * 邮箱
     */
    @Column(name = "email",length = 20)
    private String email;

    /**
     * 手机号
     */
    @Column(name = "mobile",length = 20)
    private String mobile;

    /**
     * 状态 0-待激活，1-正常，2-禁用
     */
    @Column(name = "state")
    private Integer State;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 用户名
     */
    private UaDeptEntity Dept;


}
